/*
 * Version Notes:
 * 
 *  0.1 
 *      initiated
 */

package gr.uop.cst.context.base;

/**
 * An <code>Activatable</code> object is an object that starts and stops its
 * operations.
 * 
 * An object that is anticipated to be active and inactive during its lifecycle 
 * should be considered an <code>Activatable</code> one. The rationale behind
 * &quot;activeness&quot; is an analogue the power state (on/off) of an electric
 * device.
 * 
 * As such, on the one hand, an {@link #activate()}-ed object is in its normal 
 * state and it may operate according to the rest of its specification. 
 * 
 * On the other hand, a {@link #deactivate()}-ed object, should not affect the 
 * system, virtually by any means. Maintaining the &quot;electric device&quot;
 * analogue, a <code>deactivate()</code>-ed object must still be present, in 
 * terms of internal state (i.e. its data), and it may be asked for them (i.e. 
 * getter methods). In short, <code>deactivate()</code>-ed object should not 
 * be considered {@link java.lang.Object#finalize()}-ed.
 * 
 * @author Ioannis Bourlakos &lt;jbourlakos@gmail.com&gt;
 * @since 0.1
 */
public interface Activatable {

    /**
     * Activates this object in order to be fully operational. If the object is
     * already activated, this method should cause no effect.
     * 
     * @since 0.1
     */
    public void activate();

    /**
     * Deactivates this object in order to be non-operational. If the object is
     * already deactivated, this method should cause no effect.
     * 
     * @since 0.1
     */
    public void deactivate();

    /**
     * Tells whether this is an active object.
     * 
     * @return <code>true</code> if the object is active, <code>false</code> 
     * otherwise.
     * 
     * @since 0.1
     */
    public boolean isActive();
}
